<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Issue Tracker</title>

<style>
.myissue {
	background-color: #fff;
	position: relative;
	margin: 5px, 5px, 5px, 5px;
	padding: 10px 10px 10px 10px;
	border: 1px solid #ddd;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	width: 90%;
	-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
	-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.065);
}

.myissue:hover {
	text-decoration: none;
	color: black;
	background-color: #f0f0f0;
}

.myissue a {
	text-decoration: none;
	color: black;
}

.myissue a:hover {
	text-decoration: none;
	color: black;
}

</style>

<script>
	function HomePageInit() {
		// alert("PageLoad: ");
		$
				.ajax({
					type : "post",
					url : "../GetIssueDetail",
					datatype : "json",
					data : "issueid=0",
					success : function(data) {
						if (data.issuedetails.length > 0) {

							$("#issuelist").html("<div  ><ul  >");
							var i;
							for (i = 0; i < data.issuedetails.length; i++) {

								var bugid = "N.A.";

								if (data.issuedetails[i].bugid.length > 0) {
									bugid = data.issuedetails[i].bugid;
								}

								$("#issuelist")
										.append(
												"<div class=\"myissue\"><a><li><b>Issue: </b>"
														+ data.issuedetails[i].issuetitle
														+ "<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bugid: </b>"
														+ bugid
														+ "<br/>"
														+ "<b>Createdby: </b>"
														+ data.issuedetails[i].createdby
														+ "<br/>"
														+ "<b>Details: </b>"
														+ data.issuedetails[i].issuedetails
																.substring(0,
																		200)
														+ "</li></div></a><br/>");
							}

						}

						$("#issuelist").append("</ul></div>");

					},
					error : function(jqXHR, textStatus) {
						alert("Error viewing article: " + textStatus);
					}
				});

	};
</script>
</head>
<body onload="HomePageInit()">

	<%@include file="myheader.jsp"%>

	<h4 align="center" style="color: #A1A1A1; font-style: italic;">
		Recently Added Issues</h4>


	<div style="padding-left: 10%; padding-right: 10%">
		<div id="issuelist"></div>
	</div>

</body>
</html>